Calculate Card Security Codes

Command:

This command computes and returns the 5-digit, 4-digit and 3-digit Card Security Code Values from the supplied data.

 

Field

Length & Type

Details

COMMAND MESSAGE

Message Header

m A

(Subsequently returned to the Host unchanged).

Command Code

2 A

Value RY

Mode

1 N

Value 3

Flag

1 N

A flag to indicate special processing options; value “0”.

*CSCK

32H or 1A+32H

The *CSCK encrypted under LMK 14-15 variant 4.

Account number

19 N

The full account number, left-justified and zero-filled if less than 19 digits.

Expiration date

4 N

The expiration date in YYMM format.

End Message Delimiter

1 C

Optional. Must be present if a message trailer is present. Value X'19.

Message Trailer

n A

Optional. Maximum length 32 characters.

RESPONSE MESSAGE

Message Header

m A

Returned to the Host unchanged

Response code

2 A

Value RZ

Error Code

2 N

00 : No error

10 : *CSCK parity error

12 : No keys in user storage

13 : LMK parity error

15 : Error in input data

27 : *CSCK not double length

Mode

1 N

Value 3

5-digit CSC

5 N

The 5-digit Card Security Code Value.

4-digit CSC

4 N

The 4-digit Card Security Code Value.

3-digit CSC

3 N

The 3-digit Card Security Code Value.

End Message Delimiter

1 C

Present only if present in the command message. Value X'19

Message Trailer

n A

Present only if present in the command message. Maximum length 32 characters